import request from '@/config/axios'

class Course {
	getCourse(data : any = null) : Ajax.PromiseAxiosResponse<any> {
		return request.get({
			url: '/course/getCourse', params:data
		})
	}
	getDetail(data : any) : Ajax.PromiseAxiosResponse<any> {
		return request.get({
			url: '/course/getDetail', params:data
		})
	}
	addRead(data : any) : Ajax.PromiseAxiosResponse<any> {
		return request.post({
			url: '/course/addRead',params:data
		})
	}
	addCourse(data : any) : Ajax.PromiseAxiosResponse<any> {
		return request.post({
			url: '/course/addCourse',data
		})
	}
	getChapter(data : any) : Ajax.PromiseAxiosResponse<any> {
		return request.get({
			url: '/course/getChapter', params:data
		})
	}
}

export const CourseApi = new Course()